diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index d170f2f291..54329209a4 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1993,10 +1993,10 @@ class InlineModelAdmin(BaseModelAdmin):
     @property
     def media(self):
         extra = '' if settings.DEBUG else '.min'
-        js = ['vendor/jquery/jquery%s.js' % extra, 'jquery.init.js',
-              'inlines%s.js' % extra]
+        js = ['vendor/jquery/jquery%s.js' % extra, 'jquery.init.js']
         if self.filter_vertical or self.filter_horizontal:
             js.extend(['SelectBox.js', 'SelectFilter2.js'])
+        js.append('inlines%s.js' % extra)
         if self.classes and 'collapse' in self.classes:
             js.append('collapse%s.js' % extra)
         return forms.Media(js=['admin/js/%s' % url for url in js])
